package com.tarena.lbs.pojo.basic.entity;

import java.util.Date;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.data.elasticsearch.annotations.GeoPointField;
import org.springframework.data.elasticsearch.annotations.Setting;

@Data
@Document(indexName = "lbs_store")
@Setting(shards = 1, replicas = 0)
public class StoreSearchEntity {

    @Id
    private Long id;

    @Field(type = FieldType.Text)
    private String storeHeadName;

    @Field(type = FieldType.Long)
    private Integer businessId;

    @Field(type = FieldType.Text)
    private String storeHeadPhone;

    @Field(type = FieldType.Long)
    private Integer areaId;

    @Field(type = FieldType.Text)
    private String storeLatitude;

    @Field(type = FieldType.Text)
    private String storeLongitude;

    @Field(type = FieldType.Text)
    private String storeIntroduction;

    @Field(type = FieldType.Text)
    private String storeLocation;

    @Field(type = FieldType.Text)
    private String tradeTime;

    @Field(type = FieldType.Text)
    private String storeName;

    @GeoPointField
    private String location;

    @Field(type = FieldType.Text)
    private String subwayName;

    @Field(type = FieldType.Text)
    private String storePhone;

    @Field(type = FieldType.Text)
    private String storeLogo;
    @Field(type = FieldType.Date,format= {},pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    @Field(type = FieldType.Date,format= {},pattern="yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @Field(type = FieldType.Integer)
    private Integer cityId;

    @Field(type = FieldType.Integer)
    private Integer sort;

    @Field(type = FieldType.Integer)
    private Integer provinceId;

    @Field(type = FieldType.Integer)
    private Integer storeStatus;
}

